package com.hmall.api.cart;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * TODO
 *
 * @Author haoye
 * @Date 2025/11/9 22:37
 */
@FeignClient(name = "cart-service", path = "")
public interface CartClient {

    @ApiOperation("批量删除购物车中商品")
    @ApiImplicitParam(name = "ids", value = "购物车条目id集合")
    @DeleteMapping("/carts")
    public void deleteCartItemByIds(@RequestParam("ids") List<Long> ids);

    @ApiOperation("批量删除购物车中商品")
    @ApiImplicitParam(name = "ids", value = "购物车条目id集合")
    @DeleteMapping("/carts/inner")
    public void deleteCartItemByIds(@RequestParam("ids") List<Long> ids, @RequestParam("userId") Long userId);
}
